package baseFx.common.caching.redis;

import baseFx.common.caching.CacheItem;

class JedisCacheItem {
    public String key;
    public String value;
    public Integer absoluteExpiration;
    public Integer slidingExpiration;
    public String clazz;
    public boolean isArray;
    public boolean isMap;

    static JedisCacheItem convert(CacheItem item, String value, String valueClazz) {
        JedisCacheItem newitem = new JedisCacheItem();
        newitem.key = item.key;
        newitem.value = value;
        newitem.clazz = valueClazz;
        newitem.absoluteExpiration = item.absoluteExpiration;
        newitem.slidingExpiration = item.slidingExpiration;
        return newitem;
    }
}
